package Commander;

/**
 * @author Charles Huang <br>
 * Who or what is The Collective? Guesses range from an alien invader
 * to "Those Dirty Communists". What is clear is that it is an expert
 * at salvaging mechanical supplies, as its robots have been seen
 * cannibalizing usable parts from downed enemies.
 */
public class TheCollective extends Commander
{
	public TheCollective()
	{
		super("The Collective", 2000, 0, 1.0, 1.0);
	}
	
	/**
	 * Applies commander special commander bonuses <br>
	 * The Collective's units gain 10 health for units <br>
	 * of the same class (infantry or vehicle) destroyed.
	 * @param Attacker - the attacking unit
	 * @param Target - the defending unit, if destroyed
	 */
	public void specialBonus(Unit Attacker, Unit Target)
	{
		/*
		if(!getPower() && Target != null)
		{
			if(Attacker instanceof Infantry && Target instanceof Infantry ||
					Attacker instanceof Vehicle && Target instanceof Vehicle)
			{
				Attacker.setHealth(Attacker.getHealth + 10);
				if(Attacker.getHealth > 100)
					Attacker.setHealth(100);
			}
		}
		else if(Target != null)
		{
			Attacker.setHealth(Attacker.getHealth + 20);
			if(Attacker.getHealth > 100)
				Attacker.setHealth(100);
		}
		*/
	}
	
	/**
	 * The Collective's power allows its units to salvage almost anything,
	 * giving its units the ability salvage any unit type for 20 health.
	 */
	public void activatePower()
	{
		super.activatePower();
	}
	
	public void deactivatePower()
	{
		super.deactivatePower();
	}
}
